<%--
  Created by IntelliJ IDEA.
  User: anthe
  Date: 2020/8/17
  Time: 22:16
  To change this template use File | Settings | File Templates.
  登录页面
--%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>

<head>
    <base href="${pageContext.request.contextPath}/">
    <title>登录</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        /*body {
            background: url('images/login.png') no-repeat;
            background-size: 100% auto;
        }*/

        #login_box {
            width: 20%;
            height: 400px;
            background-color: #00000060;
            margin: auto;
            margin-top: 10%;
            text-align: center;
            border-radius: 10px;
            padding: 50px 50px;
        }

        #login_box input,
        #login_box button {
            outline: none;
        }

        #login_box h2 {
            color: #ffffff90;
            margin-top: 5%;
        }

        #login_box #form .input_box{
            margin-top: 5%;
        }

        #login_box #form .input_box input {
            border: 0;
            width: 60%;
            font-size: 15px;
            color: #ffffff;
            background: #ffffff00;
            border-bottom: 2px solid #ffffff;
            padding: 5px 10px;
            margin-top: 10px;
        }

        #login_box button {
            margin-top: 50px;
            width: 40%;
            height: 20px;
            border-radius: 10px;
            border: 0;
            color: #fff;
            font-size: 15px;
            background-image: linear-gradient(120deg, #f093fb 0%, #f5576c 100%);
            cursor: pointer;
        }

        #login_box #sign_up {
            margin-top: 45%;
        }

        #login_box #sign_up a {
            color: #b94648;
        }
    </style>
    <script lang="javascript">
        function login(){
            if( document.myForm.adminName.value =="" ){
                alert("用户名不能为空");
                return false;
            }else if(document.myForm.password.value == ""){
                alert("密码不能为空");
                return false;
            } else {
                return true;
            }
        }
    </script>
</head>

<body background="images/login.png">
<div id="login_box">
    <h2>管理登录</h2>
    <form action="admin/login" method="post" name="myForm" onsubmit="return login()">
        <div id="form">
            <div class="input_box">
                <input type="text" name="adminName" value="admin">
            </div>
            <div class="input_box">
                <input type="password" name="password" value="admin">
            </div>
        </div>
        <button id="sign_in">Sign in</button>
        <br>
    </form>
    <div id="sign_up">
        <a href="javascript:;">忘记密码?</a>
    </div>
</div>
</body>

</html>